<% if !artists.nil? %>
  <% artists.each do |artist| %>
    <%=h artist.name %>

    <% if item.class.to_s == "Release" %>
      <%= link_to 'Select', release_artist_links_path(item, :artist_id => artist.id), :method => :post %>
    <% else %>
     <%= link_to 'Select', song_artist_links_path(item, :artist_id => artist.id), :method => :post %>
    <% end %>
    <hr />

  <% end %>

  Not what you're looking for? Create an entry for <%=h params[:search][:name_like] %>?
  <% if item.class.to_s == "Release" %>
    <%= link_to 'Create', release_artist_links_path(item, :name => params[:search][:name_like]), :method => :post %>
  <% else %>
    <%= link_to 'Select', song_artist_links_path(item, :name => params[:search][:name_like]), :method => :post %>
  <% end %>

<% end %>